package 第13届;
import java.io.*;
public class C_字符统计 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		String s = br.readLine();
		char c[] = s.toCharArray();
		int a[] = new int[26];
		
        for (int i = 0; i < s.length(); i++) {
            a[s.charAt(i)-'A']++;
        }
        int max=0;
        for (int i = 0; i < a.length; i++) {
            if(a[i]>max){
                max=a[i];
            }
        }
        for (int i = 0; i < a.length; i++) {
            if(a[i]==max){
                bw.write((char)(i + 'A'));
            }
        }
		
		bw.flush();
		bw.close();
		br.close();
	}
}
